Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VoyageAIRerank constructor fix #17343

Merged
merged 10 commits into from
Dec 29, 2024

Conversation

Adversarian
Copy link
Contributor

@Adversarian Adversarian commented Dec 21, 2024

Description

In the new voyageai client, the rerank method does not take truncation as an optional nullable argument. Furthermore, top_n is an optional nullable argument but was defined as a non-optional non-nullable argument previously. This made it so that the construction of the class without all the unrequired arguments would result in a validation error from Pydantic.

This change shouldn't be breaking for all intents and purposes since default values have been supplied where necessary and they will be overridden if otherwise specified. A unit test was developed for this specific case.

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 21, 2024
@Adversarian Adversarian changed the title Voyageai constructor fix VoyageAIRerank constructor fix Dec 21, 2024
@logan-markewich logan-markewich self-assigned this Dec 23, 2024
@Adversarian
Copy link
Contributor Author

@logan-markewich Terribly sorry for the ping. I just saw you approved another PR a couple hours back, wanted to make sure this PR doesn't go stale.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 29, 2024
@logan-markewich logan-markewich merged commit ada192f into run-llama:main Dec 29, 2024
11 checks passed
@logan-markewich
Copy link
Collaborator

No worries @Adversarian -- its holiday break so reviewing PRs has been a little lax lol

@Adversarian Adversarian deleted the voyageai-constructor-fix branch December 29, 2024 05:53
@Adversarian
Copy link
Contributor Author

Ah, I understand. I forgot it's that time of year now. Happy new year and thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants